package com.lzh.chatnote.chat.dao;

import com.lzh.chatnote.chat.domain.entity.GroupMember;
import com.lzh.chatnote.chat.domain.vo.request.group.GroupQueryCursorPageReq;
import com.lzh.chatnote.chat.domain.vo.response.group.GroupQueryResp;
import com.lzh.chatnote.chat.mapper.GroupMemberMapper;
import com.lzh.chatnote.chat.service.GroupMemberService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzh.chatnote.common.domian.vo.response.CursorPageBaseResp;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 群成员表 服务实现类
 * </p>
 *
 * @author lzh
 * @since 2025-09-25
 */
@Service
public class GroupMemberDao extends ServiceImpl<GroupMemberMapper, GroupMember>  {


    public List<GroupMember> queryBatchByIds(List<Long> keys) {
        return lambdaQuery().in(GroupMember::getGroupId, keys).list();
    }

    public GroupMember queryGroupMember(Long id, Long uuid) {
        return lambdaQuery().eq(GroupMember::getGroupId, id).eq(GroupMember::getUid, uuid).one();
    }
}
